<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.org/schema/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.org/ui" template="layout/template.xhtml">
	<ui:define name="body">
		<h:form>
			<p:panel header="预约信息">
				<h:panelGrid columns="2" cellpadding="3">

					<p:outputLabel for="mrName">会议室名称</p:outputLabel>
					<h:inputText id="mrName"
						value="#{meetingRoomBooking.meetingRoom.mrName}" />
					<p:outputLabel for="meetingStartTime" value="会议开始时间" />
					<rich:calendar id="meetingStartTime" required="true"
						value="#{meetingRoomBooking.meetingStartTime}"
						datePattern="yyyy/MM/dd HH:mm" timeZone="#{meetingRoomBookingListAction.timeZone}" />
					<p:outputLabel for="meetingEndTime" value="会议结束时间" />
					<rich:calendar id="meetingEndTime" required="true"
						value="#{meetingRoomBooking.meetingEndTime}"
						datePattern="yyyy/MM/dd HH:mm" timeZone="#{meetingRoomBookingListAction.timeZone}" />

					<p:outputLabel for="bookingUserId">联系人</p:outputLabel>
					<h:inputText id="bookingUserId"
						value="#{meetingRoomBooking.bookingUserId}" />
					<p:outputLabel for="bookingUserTel">联系电话</p:outputLabel>
					<h:inputText id="bookingUserTel"
						value="#{meetingRoomBooking.bookingUserTel}" />

					<p:outputLabel for="meetingTitle">会议主题</p:outputLabel>
					<p:inputTextarea id="meetingTitle"
						value="#{meetingRoomBooking.meetingTitle}" rows="5" cols="30"
						maxlength="100" autoResize="false" />

					<p:outputLabel for="meetingMemo">备注</p:outputLabel>
					<p:inputTextarea id="meetingMemo"
						value="#{meetingRoomBooking.meetingMemo}" rows="5" cols="30"
						maxlength="100" autoResize="false" />
				</h:panelGrid>
			</p:panel>

			<h:commandButton value="预约"
				action="#{meetingRoomBookingAction.create}"
				rendered="#{meetingRoomBooking.mrbId==null}" />
			<h:commandButton value="修正"
				action="#{meetingRoomBookingAction.update}"
				rendered="#{meetingRoomBooking.mrbId!=null and false}" />
			<h:commandButton value="删除"
				action="#{meetingRoomBookingAction.delete}"
				rendered="#{meetingRoomBooking.mrbId!=null}" />
			<h:commandButton value="预约"
				action="#{meetingRoomBookingAction.booking}"
				rendered="#{meetingRoomBooking.mrbId!=null and false}" />
			<s:button value="取消" action="cancel" />

		</h:form>
	</ui:define>
</ui:composition>
